package com.code.view.entity;

import org.eclipse.swt.custom.TableEditor;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Text;


/**
 * 数据库表列表行控件对象
 *
 *
 * @author 朱国军
 * @version 2015年3月5日 朱国军
 */
public class TableItemControl {
    Text tableNameText;
    Text classPathText;
    Button checkButton;
    TableEditor tableNameEditor;
    TableEditor classPathEditor;
    TableEditor checkEditor;


    /**
     * 构造函数
     *
     * @param tableNameText 数据库表名
     * @param classPathText 包路径
     * @param checkButton 选择checkBox
     * @param tableNameEditor 数据库表名编辑对象
     * @param classPathEditor 包路径编辑对象
     * @param checkEditor 选择checkBox编辑对象
     */
    public TableItemControl(Text tableNameText, Text classPathText, Button checkButton, TableEditor tableNameEditor,
            TableEditor classPathEditor, TableEditor checkEditor) {
        this.tableNameText = tableNameText;
        this.classPathText = classPathText;
        this.checkButton = checkButton;
        this.tableNameEditor = tableNameEditor;
        this.classPathEditor = classPathEditor;
        this.checkEditor = checkEditor;
    }


    /**
     * dispose方法
     *
     */
    public void dispose() {
        tableNameText.dispose();
        classPathText.dispose();
        checkButton.dispose();
        tableNameEditor.dispose();
        classPathEditor.dispose();
        checkEditor.dispose();

    }


    /**
     * 获取数据库表名Text
     *
     * @return 数据库表名Text
     */
    public Text getTableNameText() {
        return tableNameText;
    }


    /**
     * 获取包路径Text
     *
     * @return 包路径Text
     */
    public Text getClassPathText() {
        return classPathText;
    }


    /**
     * 获取
     *
     * @return checkButton
     */
    public Button getCheckButton() {
        return checkButton;
    }
}